package cn.com.zhangwoo.microstar.http;

import android.app.Application;
import android.content.SharedPreferences;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

public class ApplicationController extends Application {
	
	/**
	 * 小型数据库读取
	 */
	public static SharedPreferences preferences;
	/**
	 * 小型数据库写入
	 */
	public static SharedPreferences.Editor editor;
	 public static RequestQueue queue;

	    @Override
	    public void onCreate() {
	        super.onCreate();
	     // 初始化小型数据库的读写
	        preferences = getSharedPreferences("zhangwo", MODE_PRIVATE);
			Boolean user_first = preferences.getBoolean("FIRST",true);
		    editor = preferences.edit();
	        queue = Volley.newRequestQueue(getApplicationContext());//使用全局上下文
	    }
	    public static RequestQueue getHttpQueue() {
	        return queue;
	    }
	    
}
